package com.rulin.asp.util;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.rulin.asp.business.entity.Dictionary;
import com.rulin.asp.business.service.DictionaryService;

@Controller
@RequestMapping("/dictionary")
public class DictionaryController {

	@Autowired
	private DictionaryService dictionaryService;
	
	@RequestMapping(value = "/getDicsByModel.json", method = RequestMethod.GET)
	@ResponseBody
	public List<Dictionary> getDicByModel(String model){
		List<Dictionary> list = dictionaryService.getByModel(model);
		return list;
	}
}
